<!--{eval $_TPL['titles'] = array('船舶');}-->
<!--{template header}-->

<!--{if $view == 'getlist'}-->

$shiplist

<!--{elseif $view == 'search'}-->

<!--{eval exit('OK'); }-->

<!--{elseif $view == 'getatt'}-->

$result

<!--{elseif $view == 'getfriendships'}-->

<!--{loop $ship_list $key $value}-->
<li class="friendship"> <a href="javascript:search_ship_bymmsi('$value[ship_mmsi]');"><!--{if $value['ship_name']}-->$value['ship_name']<!--{else}-->$value['ship_mmsi']<!--{/if}--></a> </li>
<!--{/loop}-->

<!--{elseif $view == 'planlist'}-->

	<tr style="background:#ecf2ff">
		<td width="3%">&nbsp;</td>
		<td width="10%"><strong>呼号</strong></td>
		<td width="10%"><strong>状态</strong></td>
		<td width="23%"><strong>引航时间</strong></td>
		<td width="12%"><strong>船名</strong></td>
		<td width="22%"><strong>英文船名</strong></td>
		<td width="10%"><strong>国籍</strong></td>
		<td width="10%"><strong>动态</strong></td>
	</tr>
	<!--{loop $planlist $key $value}-->
	<tr>
		<td></td>
		<td class="name"><a href="javascript:;" onclick="search_ship_bycallsign('$value[shipcallsign]');">$value['shipcallsign']</a></td>
		<td class="name">$value['status']</td>
		<td class="time">$value['plantime']</td>
		<td class="name"><a href="javascript:;" onclick="search_ship_byname('$value[shipename]');">$value['shipname']</a></td>
		<td class="name"><a href="javascript:;" onclick="search_ship_byname('$value[shipename]');">$value['shipename']</a></td>
		<td class="name">$value['nationality']</td>
		<td class="name">$value['trends']</td>
	</tr>
	<tr style="background:#ecf2ff">
		<td>&nbsp;</td>
		<td colspan="2"><strong>起</strong>: $value['origin']</td>
		<td><strong>止</strong>: $value['stop']</td>
		<td><strong>代理</strong>: $value['agency']</td>
		<td><strong>引航员</strong>: $value['pilot']</td>
		<td colspan="2"><strong>副引</strong>: $value['pilot2']</td>
	</tr>
	<!--{/loop}-->
	<tr style="background:#ecf2ff" >
		<td width="20">&nbsp;</td>
		<td width="90" colspan="2">$pmulti</td>
		<td width="90" colspan="2">
			<select id="shiptrends" name="shiptrends" onchange="fship_planpage()">
				<option value="-1">动态</option>
				<!--{loop $trends_a $key $value}-->
				<option value="$key" <!--{if $key==$trends}-->selected="selected"<!--{/if}-->>$value</option>
				<!--{/loop}-->
			</select>
		</td>
		<td width="90" colspan="2">
			<select id="shipstatus" name="shipstatus" onchange="fship_planpage()">
				<option value="-1">申请状态</option>
				<!--{loop $status_a $key $value}-->
				<option value="$key" <!--{if $key==$status}-->selected="selected"<!--{/if}-->>$value</option>
				<!--{/loop}-->
			</select>
		</td>
	</tr>

<!--{elseif $view == 'getflist'}-->

<ul class="kly_shipul">
<!--{loop $friendlist $key $value}-->
	<!--{if $value[username] != ''}-->
	<li id="friend_{$value[uid]}_li" class="liheight">
		<a href="javascript:;"><!--{avatar($value[uid],small)}--></a>
		<a href="javascript:;" onclick="getFshipList('f',$value[uid])" class="k_name">{$_SN[$value[uid]]}</a>
		<ul id="f_shiplist_{$value[uid]}" style="display: none;"></ul>
	</li>
	<!--{/if}-->
<!--{/loop}-->
</ul>
<div class="pageSkip">$multi</div>

<!--{elseif $view == 'getmtaglist'}-->

<ul class="kly_shipul">
<!--{loop $mtaglist $key $value}-->
	<!--{if $value[username] != ''}-->
	<li id="mtag_{$value[uid]}_li" class="liheight">
		<a href="javascript:;"><!--{avatar($value[uid],small)}--></a>
		<a href="javascript:;" onclick="getFshipList('m',$value[uid])" class="k_name">{$_SN[$value[uid]]}</a>
		<ul id="m_shiplist_{$value[uid]}" style="display: none;"></ul>
	</li>
	<!--{/if}-->
<!--{/loop}-->
</ul>
<div class="pageSkip">$multi</div>

<!--{elseif $view == 'getattlist'}-->

<!--{if $list}-->
<!--{loop $list $key $value}-->
	<dl id="att_li_$value[ship_mmsi]" class="clear">
		<dd class="l">
		<p><span class="k_name">船名:&nbsp;</span><a href="javascript:search_ship_bymmsi('$value[ship_mmsi]');"><!--{if $value['ship_name']}-->$value['ship_name']<!--{else}-->$value['ship_mmsi']<!--{/if}--></a></p>
		<a href="cp.php?ac=attention&op=atship_cancel_k&mmsi=$value[ship_mmsi]" id="del_$value[ship_mmsi]" onclick="ajaxmenu(event, this.id)" title="删除这条关注记录" class="hide_this"></a> </dd>
	</dl>
<!--{/loop}-->
<!--{else}-->
	<dl class="clear">
		<dd class="l"><p><span class="k_name">您还没有关注的船只</span></p></dd>
	</dl>
<!--{/if}-->

<!--{elseif $view == 'getcommont'}-->

<!--{if $commont_list}-->
<!--{loop $commont_list $key $value}-->
<li class="lh22"><p><a href="space.php?uid=$value['uid']">$value['username']</a>:&nbsp;$value['content']</p><!--{date('m-d H:i',$value[dateline],1)}--></li>
<!--{/loop}-->
<!--{/if}-->

<!--{else}-->
<div class="h_5"></div>
<!-- container begin -->
<div class="container clear">
	<div class="h_0"></div>
	<script language="javascript" type="text/javascript" src="source/Silverlight.js"></script>
	<script language="javascript" type="text/javascript" src="source/script_findship.js"></script>
	<script language="javascript" type="text/javascript" src="source/ui.core.js"></script>
	<script language="javascript" type="text/javascript" src="source/ui.draggable.js"></script>
	<script type="text/javascript">
		jQuery(function() {
			jQuery("#two_button").draggable({ containment: '#silverlightControlHost', scroll: false });
		});
		function formsubmit(){
			var x = new Ajax("HTML", 'ajax_wait');
			if($("shipcommont").value == ''){
				alert('写点儿东西吧');
				return false;
			}else{
				ajaxpost("ship_commont","clearShipcommont",3000);
			}
		}
		function getcommont(mmsi) {
			var x = new Ajax('XML', 'ajax_wait');
			x.get('space.php?do=findship&view=getcommont&mmsi='+mmsi, function(s){
				$('__ship_commont').innerHTML = s;
			});
		}
		function checkMaxInput(obj)
		{
			var str = obj.value;
			var totalLength = 0;
			var list = str.split("");
			for(var i = 0; i < list.length; i++) {
				var s = list[i];
				if (s.match(/[\u0000-\u00ff]/g)) { //半角
					totalLength += 1; 
				} else if (s.match(/[\u4e00-\u9fa5]/g)) { //中文  
					totalLength += 1; 
				} else if (s.match(/[\uff00-\uffff]/g)) { //全角 
					totalLength +=1;
				}
			}
			$('wordnum').innerHTML = 100-totalLength;
			if(totalLength>100){ 
				obj.value=obj.value.substring(0,100);
			}
		}

		//获得元素位置
		function getAbsolutePosition(obj) {
			position = new Object();
			position.x = 0;
			position.y = 0;
			position.h = 0;
			position.w = 0;
			var tempobj = obj;
			if (tempobj.offsetHeight + '' != 'undefined') { position.h = tempobj.offsetHeight; }
			if (tempobj.offsetWidth + '' != 'undefined') { position.w = tempobj.offsetWidth; }
			while (tempobj != null && tempobj != document.body) {
				position.x += tempobj.offsetLeft + tempobj.clientLeft;
				position.y += tempobj.offsetTop + tempobj.clientTop;
				tempobj = tempobj.offsetParent
			}
			return position;
		}
	</script>
	<!-- left container begin -->
	<div class="home_content" > 
	<!-- picture begin-->
	<div class=" home_picshow_d"> 
		<div class="home_picshow_d_e" id="SilverlightDiv">
			<a href="javascript:;" onclick="save_view();" title="点击这里保存当前海域，下次再打开即可浏览当前海域的内容"><img src="./template/default/images/baocunhaiyu.gif" name="lt" width="90" height="86" id="lt" /> </a>
			<div id="two_button">
				<a class="hide_this" href="javascript:;"></a>
				<p id="ship_name_kly_1"></p>
				<a id="at_ship_" onclick="ajaxmenu(event, this.id)" href="#" class="link_more kly_attship" title="关注船舶"><img src="./template/default/images/guanzhuchuanbo.png" width="72" height="23" /></a>
				<a href="#tocomment" class="link_more kly_attship" title="参与船舶的评论"><img src="./template/default/images/canyupinglun.png" width="72" height="23" alt="参与评论" /></a>
			</div>
			<div id="kly_haitu">
			<div id="silverlightControlHost" class="kly_haitu" style="height:300px;width:650px">
				<object id="silverlightControl" data="data:application/x-silverlight-2,"  type="application/x-silverlight-2" width="100%" height="100%">
					<param name="source" value="source/ClientBin/SilverlightApplication1.xap"/>
					<param name="onerror" value="onSilverlightError" />
					<param name="background" value="white" />
					<param name="minRuntimeVersion" value="4.0.50826.0" />
					<param name="autoUpgrade" value="true" />
					<param name="quality" value="true" />
					<param name="allowscriptaccess" value="always" />
					<param name="windowless" value="true" />
					<param name="InitParams" value="SDZ=60.12.235.95:8080/dll,SAIS=http://60.12.235.95:8080,DJD=123.7603,DWD=37.552,IJB=6,UID=0,UTYPE=2,EDITQX=1" />
					<a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50826.0" style="text-decoration: none;">
						<img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="获取 Microsoft Silverlight" style="border-style: none"/>
					</a>
					<iframe style='visibility:hidden;height:0;width:0;border:0px'></iframe>
				</object>
			</div>
			</div>
		</div>
	</div>
	<!-- picture end-->

	<!-- text begin-->
	<div id="text_m" name="tocomment">
		<div class=" home_picshow_c" id="home_picshow_c"> 
			<div class="cnt_chu" >
				<ul class="list" id="__ship_commont"></ul>
			</div>
		</div>
		<div class="home_send_mes  clear" id="home_send_mes_c">
			<div class="user_head"><!--{avatar($_SGLOBAL[supe_uid],middle)}--></div>
			<form method="post" id="ship_commont" name="ship_commont" action="cp.php?ac=findship&op=commontsubmit">
				<div class="write_mes">
					<div class="text_bg" id="text_bg_c">
						<textarea id="shipcommont" name="shipcommont" onKeyDown="checkMaxInput(this)" onKeyUp="checkMaxInput(this)" onpropertychange="if(this.value.length>100) this.value=this.value.substr(0,100)"  onBlur="checkMaxInput(this)"></textarea>
					</div>
					<div class="clear">
						<h3 class="disnum_h">船名：<span id="ship_name_kly"></span></h3>
						<div id="two">
							<select id="friend" name="friend" style="float:left;">
								<option value="0">全站可见</option>
								<option value="1">好友可见</option>
							</select>
						</div>
						<input type="hidden" name="commontsubmit" value="true" />
						<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
						<input type="hidden" name="mmsi" id="mmsi" value="$mmsi">
						<input type="hidden" name="shipname" id="shipname" value="" />
						<input type="hidden" name="callsign" id="callsign" value="" />
						<input type="submit" class="mes_pub" value="发布" id="shipcommontsubmit" onclick="return formsubmit();" name="shipcommontsubmit" disabled="true"/>
						<span id="dis_wordnum" class="disnum">你还可以输入<strong id="wordnum">100</strong>字</span>
					</div>
				</div>
			</form>
		</div>
	</div>
	<div class="h_5"></div>
	<!-- text end-->
	<!--{if $planlist}-->
	<div class=" home_picshow_e">
		<h3> <a class="a_share" id="a_share" href="cp.php?ac=planshare&type=plan&pid=$pid{$pidstr}" onclick="ajaxmenu(event, this.id, 1)" title="分享调度计划">分享</a> </h3>
		<div class="h_10"></div>
		<table width="650px" cellspacing="0" cellpadding="0" border="0">
		<tbody class="blue" id="shipplan">
			<tr style="background:#ecf2ff">
				<td width="3%">&nbsp;</td>
				<td width="10%"><strong>呼号</strong></td>
				<td width="10%"><strong>状态</strong></td>
				<td width="23%"><strong>引航时间</strong></td>
				<td width="12%"><strong>船名</strong></td>
				<td width="22%"><strong>英文船名</strong></td>
				<td width="10%"><strong>国籍</strong></td>
				<td width="10%"><strong>动态</strong></td>
			</tr>
			<!--{loop $planlist $key $value}-->
			<tr onmouseover="showtr($key)">
				<td></td>
				<td class="name"><a href="javascript:;" onclick="search_ship_bycallsign('$value[shipcallsign]');">$value['shipcallsign']</a></td>
				<td class="name">$value['status']</td>
				<td class="time">$value['plantime']</td>
				<td class="name"><a href="javascript:;" onclick="search_ship_byname('$value[shipename]');">$value['shipname']</a></td>
				<td class="name"><a href="javascript:;" onclick="search_ship_byname('$value[shipename]');">$value['shipename']</a></td>
				<td class="name">$value['nationality']</td>
				<td class="name">$value['trends']</td>
			</tr>
			<tr id="plantable_tr_$key" style="display:none;background:#ecf2ff">
				<td>&nbsp;</td>
				<td colspan="8">
					<div style="width:100px;float:left;"><strong>起</strong>: $value['origin']</div>
					<div style="width:100px;float:left;"><strong>止</strong>: $value['stop']</div>
					<div style="width:140px;float:left;"><strong>代理</strong>: $value['agency']</div>
					<div style="width:140px;float:left;"><strong>引航员</strong>: $value['pilot']</div>
					<div style="width:140px;float:left;"><strong>副引</strong>: $value['pilot2']</div>
				</td>
			</tr>
			<!--{/loop}-->
			<tr style="background:#ecf2ff" >
				<td width="20">&nbsp;</td>
				<td width="90" colspan="2">$pmulti</td>
				<td width="90" colspan="2">
					<select id="shiptrends" name="shiptrends" onchange="fship_planpage()">
						<option value="-1">动态</option>
						<!--{loop $trends_a $key $value}-->
						<option value="$key" <!--{if $key==$trends}-->selected="selected"<!--{/if}-->>$value</option>
						<!--{/loop}-->
					</select>
				</td>
				<td width="90" colspan="2">
					<select id="shipstatus" name="shipstatus" onchange="fship_planpage()">
						<option value="-1">申请状态</option>
						<!--{loop $status_a $key $value}-->
						<option value="$key" <!--{if $key==$status}-->selected="selected"<!--{/if}-->>$value</option>
						<!--{/loop}-->
					</select>
				</td>
			</tr>
		</tbody>
		</table>
	</div>
	<!--{/if}-->
</div>

<!-- right container begin -->
<div class="home_side">
	<div class="box_b ">
		<div class="box-outer">
			<div class="title">
				<h4 id="a">我关注的船舶</h4>
			</div>
			<div class="y_mb_know_b" id="y_mb_know_a">
			<!--{if $list}-->
			<!--{loop $list $key $value}-->
				<dl id="att_li_$value[ship_mmsi]" class="clear">
					<dd class="l">
					<p><span class="k_name">船名:&nbsp;</span><a href="javascript:search_ship_bymmsi('$value[ship_mmsi]');"><!--{if $value['ship_name']}-->$value['ship_name']<!--{else}-->$value['ship_mmsi']<!--{/if}--></a></p>
					<a href="cp.php?ac=attention&op=atship_cancel_k&mmsi=$value[ship_mmsi]" id="del_$value[ship_mmsi]" onclick="ajaxmenu(event, this.id)" title="删除这条关注记录" class="hide_this"></a> </dd>
				</dl>
			<!--{/loop}-->
			<!--{else}-->
				<dl class="clear">
					<dd class="l"><p><span class="k_name">您还没有关注的船只</span></p></dd>
				</dl>
			<!--{/if}-->
			</div>
		</div>
	</div>
	<div class="h_10"></div>

	<!--{if $friendlist}-->
	<div class="box_b ">
		<div class="box-outer">
			<div class="title">
				<h4 id="b">好友关注的船舶</h4>
				<span> <a href="javascript:;" class="kly_hide"></a> </span>
			</div>
			<div class="y_mb_know_b" id="friend_list">
				<ul class="kly_shipul">
				<!--{loop $friendlist $key $value}-->
					<!--{if $value[username] != ''}-->
					<li id="friend_{$value[uid]}_li" class="liheight">
						<a href="javascript:;"><!--{avatar($value[uid],small)}--></a>
						<a href="javascript:;" onclick="getFshipList('f',$value[uid])" class="k_name">{$_SN[$value[uid]]}</a>
						<ul id="f_shiplist_{$value[uid]}" style="display: none;"></ul>
					</li>
					<!--{/if}-->
				<!--{/loop}-->
				</ul>
				<div class="pageSkip">$str</div>
			</div>
		</div>
	</div>
	<div class="h_10"></div>
	<!--{/if}-->

	<!--{if $mtaglist}-->
	<div class="box_b ">
		<div class="box-outer">
			<div class="title">
				<h4 id="b">同事关注的船舶</h4>
				<span> <a href="javascript:;" class="kly_hide"></a> </span>
			</div>
			<div class="y_mb_know_b" id="mtag_list">
				<ul class="kly_shipul">
				<!--{loop $mtaglist $key $value}-->
					<!--{if $value[username] != ''}-->
					<li id="mtag_{$value[uid]}_li" class="liheight">
						<a href="javascript:;"><!--{avatar($value[uid],small)}--></a>
						<a href="javascript:;" onclick="getFshipList('m',$value[uid])" class="k_name">{$_SN[$value[uid]]}</a>
						<ul id="m_shiplist_{$value[uid]}" style="display: none;"></ul>
					</li>
					<!--{/if}-->
				<!--{/loop}-->
				</ul>
				<div class="pageSkip">$mtagstr</div>
			</div>
		</div>
	</div>
	<!--{/if}-->

	<div class="h_10"></div>
</div>

<div class="h_10"></div>
	<!--{if $mmsi}-->
	<script type="text/javascript">
		$("searchkey").value = $mmsi;
		window.setTimeout("$('searchsubmit').click()",8000);
	</script>
	<!--{/if}-->
<!--{/if}-->

<!--{template footer}-->